<style>
.examFail-container {
    width: 100%;
    height: 100%;
}

.examFail-img {
    height: 70%;
    width: 100%;
}

.examFail-img img {
    width: 100%;
    height: 100%;
}

.examFail-btn .ivu-btn {
    width: 200px;
    height: 50px;
    background: #3ca2ef;
    color: #fff;
    letter-spacing: 2px;
    font-size: 18px;
}

.examFail-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 20%;
}

.exam-result {
    height: 10%;
    padding-top: 5%;
    text-align: center;
    font-size: 16px;
}

.exam-result p {
    color: #999;
    font-size: 16px;
}
</style>
<template>
    <div class="examFail-container">
        <div class="examFail-img">
            <img src="../images/exam_fail.png" alt="">
        </div>
        <div class="exam-result">
            <p>答对{{examListlength-failexamListlength}}道题，答错{{failexamListlength}}道题，</p>
            <p>请继续努力哦！</p>
        </div>
        <div class="examFail-btn">
            <Button @click="examFail">查看错题</Button>
        </div>
    </div>
</template>
<script>
export default {
    data() {
        return {
            failexamList: [],
            examListlength: 0,
            failexamListlength: 0,
        }
    },
    mounted() {
         var that = this
        that.$data.failexamList = that.$route.params.ERROR_ANSWERS
        that.$data.examListlength = that.$route.params.examlength
        that.$data.failexamListlength = that.$route.params.ERROR_ANSWERS.length

    },
    methods: {
        examFail() {
            var that = this
            this.$router.replace({ name: 'examfailList', params: { ERROR_ANSWERS: that.$data.failexamList,userData:that.$route.params.userData } });
        }
    }
}
</script>